import { postMethod, getMethod } from "../../../../../utils/http";
// 商品列表
export async function getList() {
    return await postMethod(`xyxy/wxapp/web/product/list`, {});
}


// 商品（增）
export async function add(data) {
    return await postMethod(`xyxy/wxapp/web/product/save?productName=${data.productName}&jifen=${data.jifen}&productImage=${data.productImage}&productDetailImage=${data.productDetailImage}&count=${data.count}`, {

    });
}
// 价格（增）
export async function priceAdd(productId, data) {
    return await postMethod(`xyxy/wxapp/web/product/payWay/save?productId=${productId}&${data}`, {

    });
}
// 商品 -(查)
export async function queryItem(productId) {
    return await postMethod(`xyxy/wxapp/web/product/detail?productId=${productId}`, {});
}
// 商品 -(改)
export async function edit(data) {
    return await postMethod(`xyxy/wxapp/web/product/edit?productName=${data.productName}&jifen=${data.jifen}&productImage=${data.productImage}&productDetailImage=${data.productDetailImage}&productId=${data.productId}&count=${data.count}`, {

    });
}
// 价格 -(改)
export async function priceEdit(productId, data) {
    return await postMethod(`xyxy/wxapp/web/product/payWay/edit?productId=${productId}&${data}`, {

    });
}

// 商品 -(删)
export async function del(productId) {
    return await postMethod(`xyxy/wxapp/web/product/delete?productId=${productId}`, {

    });
}
// 价格 -(删)
export async function priceDel(id) {
    return await postMethod(`xyxy/wxapp/web/product/payWay/delete?id=${id}`, {
    });
}

// 

